import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    includePageNames: [],
    title: '',
  },
  mutations: {
    ['SET_INCLUDEPAGENAMES'](state, includePageNames) {
      state.includePageNames = includePageNames
    },
    ['SET_TITLE'](state, title) {
      document.title = title
      state.title = title
    }
  },
  actions: {

  },
  getters: {
    includePageNames: state => state.includePageNames,
    title: state => state.title,
  }
})
